﻿function openCall(id) {
    window.location = 'Call/Details/' + id.toString();
}

function openPreview(Id) {

    var win = Ext.create('widget.window', {
        title: 'Chamado ' + Id.toString() + ' | Pré-visualização',
        closable: true,
        closeAction: 'hide',
        width: 600,
        minWidth: 350,
        height: 350,
        layout: {
            type: 'border',
            padding: 5
        },
        items: [{
            region: 'center',
            xtype: 'tabpanel',
            items:
                    [
                    {
                        title: 'Geral',
                        autoLoad: 'Call/GetPreview?Id=' + Id.toString(),
                        closable: false
                    }
                    ]
        }]
    });
    win.show(this, null);
}